package com.wmh.baseservice.robot.interceptor;

import com.wmh.baseservice.common.utils.LogUtil;
import com.wmh.baseservice.robot.service.RobotInfoService;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 机器人请求拦截器
 * @author 青石
 */
@Component
public class RobotRequestInterceptor implements HandlerInterceptor {

    @Resource
    private RobotInfoService robotInfoService;

    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        LogUtil.info("RobotRequestInterceptor => addr : {} ",request.getRemoteAddr());
        return true;
    }
}
